package br.com.model.entity;

// Generated 28/10/2013 11:27:52 by Hibernate Tools 3.4.0.CR1

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Cliente generated by hbm2java
 */
@Entity
@Table(name = "cliente", catalog = "locarweb_db")
public class Cliente implements java.io.Serializable {

	private Integer idCliente;
	private Login login;
	private String nome;
	private String cpf;
	private String telefone;
	private String email;
	private String cnh;
	private Date datanasc;
	private Set reservas = new HashSet(0);
	private Set enderecos = new HashSet(0);

	public Cliente() {
	}

	public Cliente(Login login) {
		this.login = login;
	}

	public Cliente(Login login, String nome, String cpf, String telefone,
			String email, String cnh, Date datanasc, Set reservas, Set enderecos) {
		this.login = login;
		this.nome = nome;
		this.cpf = cpf;
		this.telefone = telefone;
		this.email = email;
		this.cnh = cnh;
		this.datanasc = datanasc;
		this.reservas = reservas;
		this.enderecos = enderecos;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "idCLIENTE", unique = true, nullable = false)
	public Integer getIdCliente() {
		return this.idCliente;
	}

	public void setIdCliente(Integer idCliente) {
		this.idCliente = idCliente;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "LOGIN_idLOGIN", nullable = false)
	public Login getLogin() {
		return this.login;
	}

	public void setLogin(Login login) {
		this.login = login;
	}

	@Column(name = "NOME")
	public String getNome() {
		return this.nome;
	}

	public void setNome(String nome) {
		this.nome = nome;
	}

	@Column(name = "CPF")
	public String getCpf() {
		return this.cpf;
	}

	public void setCpf(String cpf) {
		this.cpf = cpf;
	}

	@Column(name = "TELEFONE")
	public String getTelefone() {
		return this.telefone;
	}

	public void setTelefone(String telefone) {
		this.telefone = telefone;
	}

	@Column(name = "EMAIL")
	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	@Column(name = "CNH")
	public String getCnh() {
		return this.cnh;
	}

	public void setCnh(String cnh) {
		this.cnh = cnh;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "DATANASC", length = 10)
	public Date getDatanasc() {
		return this.datanasc;
	}

	public void setDatanasc(Date datanasc) {
		this.datanasc = datanasc;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "cliente")
	public Set getReservas() {
		return this.reservas;
	}

	public void setReservas(Set reservas) {
		this.reservas = reservas;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "cliente")
	public Set getEnderecos() {
		return this.enderecos;
	}

	public void setEnderecos(Set enderecos) {
		this.enderecos = enderecos;
	}

}
